<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>路由</title>
		<script src="../js/angular.min.js"></script>
		<script src="../js/angular-route.min.js"></script>
	</head>

	<body ng-app="myapp">
		<div>
			<h1>head</h1>
			<ul>
				<li><a href="#/java">java</a></li>
				<li><a href="#/ios">ios</a></li>
				<li><a href="#/android">android</a></li>
			</ul>
		</div>
		<div ng-view>
			
		</div>
		<div>
			<h1>ROOT</h1>
		</div>
	</body>
	<script type="text/javascript">
			var myapp = angular.module("myapp",['ngRoute']);
			myapp.config(["$routeProvider",function($routeProvider) {
				$routeProvider.when("/java", {
					templateUrl: '5_1.html'
				}).when("/ios", {
					templateUrl: '5_2.html'
				}).when("/android", {
					templateUrl: '5_3.html'
				}).otherwise({
					redirectTo: '/java'
				});
			}]);
		</script>

</html>